From dfc04a590d1aebd3d4331d93e3e09d7b408e87f2 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 7 Jul 2020 02:05:18 -0400 Subject: [PATCH] inspector: Reshuffle the sidebar Move the sidebar in the object page below the object header, for a more logical hierarchy. --- gtk/inspector/inspector.css | 4 + gtk/inspector/window.c | 17 --- gtk/inspector/window.ui | 255 ++++++++++++++++++------------------ 3 files changed, 134 insertions(+), 142 deletions(-) diff --git a/gtk/inspector/inspector.css b/gtk/inspector/inspector.css index e0b3c7ecf7..857fb2f8ce 100644 --- a/gtk/inspector/inspector.css +++ b/gtk/inspector/inspector.css @@ -45,3 +45,7 @@ .list .cell combobox { padding: 0 4px; } + +stacksidebar.object-details { + border-top: 1px solid lightgray; +} diff --git a/gtk/inspector/window.c b/gtk/inspector/window.c index b2142de98c..a064a93c4d 100644 --- a/gtk/inspector/window.c +++ b/gtk/inspector/window.c @@ -316,22 +316,6 @@ object_details_changed (GtkWidget *combo, gtk_stack_set_visible_child_name (GTK_STACK (iw->object_center_stack), "title"); } -static void -toggle_sidebar (GtkWidget *button, - GtkInspectorWindow *iw) -{ - if (gtk_revealer_get_child_revealed (GTK_REVEALER (iw->sidebar_revealer))) - { - gtk_revealer_set_reveal_child (GTK_REVEALER (iw->sidebar_revealer), FALSE); - gtk_button_set_icon_name (GTK_BUTTON (button), "go-next-symbolic"); - } - else - { - gtk_revealer_set_reveal_child (GTK_REVEALER (iw->sidebar_revealer), TRUE); - gtk_button_set_icon_name (GTK_BUTTON (button), "go-previous-symbolic"); - } -} - static void go_up_cb (GtkWidget *button, GtkInspectorWindow *iw) @@ -674,7 +658,6 @@ gtk_inspector_window_class_init (GtkInspectorWindowClass *klass) gtk_widget_class_bind_template_callback (widget_class, close_object_details); gtk_widget_class_bind_template_callback (widget_class, object_details_changed); gtk_widget_class_bind_template_callback (widget_class, notify_node); - gtk_widget_class_bind_template_callback (widget_class, toggle_sidebar); gtk_widget_class_bind_template_callback (widget_class, go_previous_cb); gtk_widget_class_bind_template_callback (widget_class, go_up_cb); gtk_widget_class_bind_template_callback (widget_class, go_down_cb); diff --git a/gtk/inspector/window.ui b/gtk/inspector/window.ui index d7a51826c3..5a46d0fb15 100644 --- a/gtk/inspector/window.ui +++ b/gtk/inspector/window.ui @@ -207,17 +207,6 @@ object-details - - - slide-right - 1 - - - object_details - - - - vertical @@ -226,17 +215,16 @@ - - go-previous-symbolic + + open-menu-symbolic Toggle Sidebar - 0 6 6 6 6 center center - + 1 @@ -393,129 +381,146 @@ - - + - - misc - Miscellaneous - - + + slide-right + + + + object_details + - + - - properties - Properties - - - prop_search_entry + + + + + misc + Miscellaneous + + + + - - - - - - layout_properties - Layout - - - layout_prop_search_entry + + + + properties + Properties + + + prop_search_entry + + - - - - - - css-nodes - CSS Nodes - - - + + + + layout_properties + Layout + + + layout_prop_search_entry + + - - - - - - size-groups - Size Groups - - - - - - - - data - Data - - - - - - - - list-data - Data - - + + + + css-nodes + CSS Nodes + + + + + - - - - - - actions - Actions - - - refresh_actions_button + + + + size-groups + Size Groups + + + - - - - - - menu - Menu - - - - - - - - controllers - Controllers - - - object_tree + + + + data + Data + + + - - - - - - magnifier - Magnifier - - - magnification_adjustment + + + + list-data + Data + + + + - - - - - - shortcuts - Shortcuts - - + + + + actions + Actions + + + refresh_actions_button + + - + + + + menu + Menu + + + + + + + + controllers + Controllers + + + + + + + + + magnifier + Magnifier + + + magnification_adjustment + + + + + + + shortcuts + Shortcuts + + + + + + -- 2.30.2